<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/js/util.js"></script>
    <script type="text/javascript" >
        var  tss =sayOn("tq110");
        alert(tss);
    </script>
</head>
<body>

<br/>========================日期格式==========================
<span  th:text="${#strings.isEmpty(data.msg)}"></span><br/>
<span  th:text="${#strings.isEmpty(data.msg2)}"></span><br/>
<span  th:text="${#strings.contains(data.msg,'天气')}"></span><br/>

<p th:text="${data.msg}">sfbdsdfb</p>evserb
<br/>========================日期格式==========================
<p th:text="${#dates.format(data.date)}"></p>
<p th:text="${#dates.format(data.date,'yyyy-MM-dd HH:mm:ss')}"></p>
<hr/>
<br/>========================条件判断=========================<br/>
<p th:if="${data.sex}=='男'">性别:男</p><br/>
<p th:if="${data.sex}=='女'">性别:小姐姐</p><br/>
最喜欢的游戏:<div th:switch="${data.game}">
    <span  th:case="0">英雄联盟</span>
    <span  th:case="1">和平精英</span>
    <span  th:case="2">极品飞车</span>
    <span  th:case="3">中国象棋</span>
    <span  th:case="4">王者荣耀</span>
    <span  th:case="*">其他游戏</span>
</div>
<br/>========================循环迭代=======================<br/>
<ul th:each="oneLi,var:${students}">
    <li>
        <span th:text="${oneLi.id}"></span>===
        <span th:text="${oneLi.username}"></span>===
        <span th:text="${oneLi.age}"></span>===
        <span th:text="${var.count}"></span>===
        <span th:text="${var.size}"></span>===
        <span th:text="${var.even}"></span>===
        <span th:text="${var.odd}"></span>===
        <span th:text="${var.index}"></span>===
        <span th:text="${var.first}"></span>===
    </li>
</ul>
<br/>========================循环迭代(复杂一点)=======================<br/>
<table border="1">
    <tr>
        <th>key</th>
        <th>id</th>
        <th>用户名</th>
        <th>年龄</th>
    </tr>
    <tr th:each="oneLi:${mapDom}">
        <td th:each="entry:${oneLi}"   th:text="${entry.key}"></td>
        <td th:each="entry:${oneLi}"   th:text="${entry.value.id}"></td>
        <td th:each="entry:${oneLi}"   th:text="${entry.value.username}"></td>
        <td th:each="entry:${oneLi}"   th:text="${entry.value.age}"></td>
    </tr>
</table>
<br/>========================作用域属性取值======================<br/>
request作用域:<span th:text="${#httpServletRequest.getAttribute('key1')}"></span>  <br/>
sesssion作用域:<span th:text="${session.key2}"></span><br/>
application作用域:<span th:text="${application[key3]}"></span> <br/>
随便取得:
<br/>========================url说明=====================<br/>
<a th:href="@{http://www.baidu.com}">百度一下</a><br/>
<a th:href="@{/music/demoJson}">相对路径(相对本项目路径)</a><br/>
<a th:href="@{/skt(id=1)}">相对路径2</a><br/>
<a th:href="@{/skt(id=446,username=他防御技能)}">相对路径3</a><br/>
<a th:href="@{/rng/{id}/{username}(id=4586,username=uzi_史森明)}">restful风格1 </a><br/>
<a th:href="@{/rng/7455/faker李相赫}">restful风格2 </a><br/>
<a th:href="@{~/project2/doAction2}">相对服务器的路径(会请求本服务器的project2项目的/doAction2路径)</a><br/>
<br/>============================================<br/>
<img src="/img/img01.jpg"  th:src="@{/img/img01.jpg}"  width="100px"  height="100px">
<hr/>
<!--原原本本输出来-->
<div th:text="${data.sb3}"></div>
<!--解析以后输出来-->
<div th:utext="${data.sb3}"></div>
<div class="box3" th:class="${data.k33}" th:text="${data.thkey5}">偶就弄了块呢是</div>
<hr/>
<h3  th:text="${it}"  th:each="it:${data.users}"></h3>

<h3>
    <span  th:each="key5:${data.users}">[[${key5}]]</span>===>
</h3>
<hr/>


</body>
</html>

